Error: CPPCHECK_WARNING (CWE-401): [#def1] libimobiledevice-1.3.0_20230705git6fc41f5-build/libimobiledevice-6fc41f57fc607df9b07446ca45bdf754225c9bd9/tools/ideviceimagemounter.c:194: error[memleak]: Memory leak: image_sig_path # 192| printf("No device found.\n"); # 193| } # 194|-> return -1; # 195| } # 196| Error: GCC_ANALYZER_WARNING (CWE-688): [#def2] libimobiledevice-1.3.0_20230705git6fc41f5-build/libimobiledevice-6fc41f57fc607df9b07446ca45bdf754225c9bd9/tools/ideviceimagemounter.c:271:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘image_sig_path’ where non-null expected /usr/include/sys/stat.h:205:12: note: argument 1 of ‘stat’ must be non-null # 269| } # 270| image_size = fst.st_size; # 271|-> if (stat(image_sig_path, &fst) != 0) { # 272| fprintf(stderr, "ERROR: stat: %s: %s\n", image_sig_path, strerror(errno)); # 273| goto leave; Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] libimobiledevice-1.3.0_20230705git6fc41f5-build/libimobiledevice-6fc41f57fc607df9b07446ca45bdf754225c9bd9/tools/ideviceimagemounter.c:317:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(image_path, "rb")’ # 315| # 316| char *targetname = NULL; # 317|-> if (asprintf(&targetname, "%s/%s", PKG_PATH, "staging.dimage") < 0) { # 318| fprintf(stderr, "Out of memory!?\n"); # 319| goto leave; Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] libimobiledevice-1.3.0_20230705git6fc41f5-build/libimobiledevice-6fc41f57fc607df9b07446ca45bdf754225c9bd9/tools/ideviceimagemounter.c:317:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(image_path, "rb")’ # 315| # 316| char *targetname = NULL; # 317|-> if (asprintf(&targetname, "%s/%s", PKG_PATH, "staging.dimage") < 0) { # 318| fprintf(stderr, "Out of memory!?\n"); # 319| goto leave; Error: GCC_ANALYZER_WARNING (CWE-775): [#def5] libimobiledevice-1.3.0_20230705git6fc41f5-build/libimobiledevice-6fc41f57fc607df9b07446ca45bdf754225c9bd9/tools/ideviceimagemounter.c:322:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(image_path, "rb")’ # 320| } # 321| char *mountname = NULL; # 322|-> if (asprintf(&mountname, "%s/%s", PATH_PREFIX, targetname) < 0) { # 323| fprintf(stderr, "Out of memory!?\n"); # 324| goto leave; Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] libimobiledevice-1.3.0_20230705git6fc41f5-build/libimobiledevice-6fc41f57fc607df9b07446ca45bdf754225c9bd9/tools/ideviceimagemounter.c:322:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(image_path, "rb")’ # 320| } # 321| char *mountname = NULL; # 322|-> if (asprintf(&mountname, "%s/%s", PATH_PREFIX, targetname) < 0) { # 323| fprintf(stderr, "Out of memory!?\n"); # 324| goto leave;
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.82.0 |
diffbase-analyzer-version-cppcheck | 2.16.0 |
diffbase-analyzer-version-gcc | 14.2.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.0 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-250.us-west-2.compute.internal |
diffbase-mock-config | fedora-rawhide-gcc-latest-x86_64 |
diffbase-project-name | libimobiledevice-1.3.0^20240916gited9703d-1.fc42 |
diffbase-store-results-to | /tmp/tmpkffq2liu/libimobiledevice-1.3.0^20240916gited9703d-1.fc42.tar.xz |
diffbase-time-created | 2024-11-13 01:25:27 |
diffbase-time-finished | 2024-11-13 01:27:34 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpkffq2liu/libimobiledevice-1.3.0^20240916gited9703d-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpkffq2liu/libimobiledevice-1.3.0^20240916gited9703d-1.fc42.src.rpm' |
diffbase-tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-250.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libimobiledevice-1.3.0^20230705git6fc41f5-5.fc41 |
store-results-to | /tmp/tmpau1trt9d/libimobiledevice-1.3.0^20230705git6fc41f5-5.fc41.tar.xz |
time-created | 2024-11-13 01:22:43 |
time-finished | 2024-11-13 01:25:02 |
title | Fixed findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpau1trt9d/libimobiledevice-1.3.0^20230705git6fc41f5-5.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpau1trt9d/libimobiledevice-1.3.0^20230705git6fc41f5-5.fc41.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |